module shader.matshaderdistance;

import shader.abstractshader;
import scene.scene;
import scene.ray;
import scene.intersection;
import utils.color;

class MatShaderDistance: AbstractShader {
    public void getColor(inout Ray ray, inout Intersection inters,
        inout RGBColor col)
    {
        col.r = col.b = col.g = inters.t/1000.0f;
    }

    public char[] toString() {
        return "Intersection point distance";
    }
}

